package com.basker.pisces.service.dto;

public abstract class AbstractServiceResult<TData> implements IServiceResult<TData> {

    private int status = 0;
    private String message;
    private TData data;

    protected AbstractServiceResult() {

    }

    protected AbstractServiceResult(int status, String message) {
        this.status = status;
        this.message = message;
    }

    protected AbstractServiceResult(int status, String message, TData data) {
        this(status, message);
        this.data = data;
    }

    @Override
    public TData getData() {
        return data;
    }

    @Override
    public String getMessage() {
        return message;
    }

    @Override
    public int getStatus() {
        return status;
    }

    @Override
    public void setData(TData data) {
        this.data = data;
    }

    @Override
    public void setMessage(String message) {
        this.message = message;
    }

    @Override
    public void setStatus(int status) {
        this.status = status;
    }

}
